    //获取组织名称
$('#purchaseContract_combobox').combobox({
    url: '/user/getUserOrgHrorg',
    valueField: 'pkhrorg',
    textField: 'name'
})
//表格
  function queryPurchaseContract(){
      $('#purchaseContract_form').form('submit', {
          url: '/procurement/queryPurchaseContract',
          onSubmit: function(){
              var isValid = $(this).form('validate');
              return isValid;	// 返回false终止表单提交
          },
          success: function(data){
              var data = eval('(' + data + ')');
              if (data.status==200){
                  $('#purchaseContract_dg').datagrid({
                      nowrap: false,
                      fitColumns:true,
                      columns:[[
                          {title:'组织',field:'orgName',resizable:false,align:'center',width:100},
                          {title:'供应商编码',field:'supplierCode',resizable:false,align:'center',width:40},
                          {title:'供应商名称',field:'supplierName',resizable:false,align:'left',width:120},
                          {title:'物料编码',field:'matCode',align:'center',width:50,resizable:false},
                          {title:'物料名称',field:'matName',align:'left',width:250,resizable:false},
                          {title:'数量下限',field:'vbdef12',resizable:false,align:'center',width:50},
                          {title:'重复数',field:'count',align:'center',width:20,resizable:false},
                          {title:'运输方式',field:'vbdef6',align:'center',width:100,resizable:false},
                      ]],
                      toolbar: [{
                          text: '导出数据',
                          iconCls: 'icon-export-excel',
                          handler: function () {
                              $('#purchaseContract_dg').datagrid('toExcel', '采购合同唯一性统计表.xls');

                          }
                      }]
                  })
                  //加载数据至表格
                  $('#purchaseContract_dg').datagrid("loadData",data.obj);
              }else{
                  $('#purchaseContract_dg').datagrid({fitColumns:true,toolbar:null})
                 $('#purchaseContract_dg').datagrid("loadData",[]);
                 layer.msg(data.msg,{'icon':5})
              }

          }
      });
  }
